﻿using System;
using ch11.binary.type;
using ch11.interpreter;

namespace ch11.instance
{
    public struct NativeFunction : IFunction
    {
        public FuncType t;
        public SharpFunc f;

        public FuncType Type()
        {
            return t;
        }

        public (object[], Exception) Call(params object[] args)
        {
            return f.Invoke(args);
        }
    }
}